package com.tedu._04mybatis.mapper;

import com.tedu._04mybatis.pojo.User;
import com.tedu._04mybatis.pojo.UserVO1;
import com.tedu._04mybatis.pojo.UserVO2;
import com.tedu._04mybatis.pojo.UserVO3;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {

    @Insert("insert into user(username,password,nickname,created)" +
            " values(#{username},#{password},#{nickname},#{created})")
    int insert(User user);
    @Insert("delete from user where id=#{id}")
    int deteleteById(Integer id);
    int dynamicUpdate(User user);
    int dynamicDelete(Integer[] ids);
    int dynamicDelete1(List<Integer> ids);
    UserVO1 selectById(Integer id);
    UserVO2 selectUserAndWeiboById(Integer id);
    UserVO3 selectUserAndCommentById(Integer id);


}
